#!/bin/bash --norc

ROOT="external/crosstool_ng_linux_x86_64_gcc_8.3.0"
PREFIX="x86_64-unknown-linux-gnu"
TOOL=$(basename $0)

if [ -d "$EXT_BUILD_ROOT" ];
then
    export PATH=$EXT_BUILD_ROOT/$ROOT/bin:$PATH
    exec -a $PREFIX-$TOOL $EXT_BUILD_ROOT/$ROOT/bin/$PREFIX-$TOOL "$@"
else
    export PATH=$ROOT/bin:$PATH
    exec -a $PREFIX-$TOOL $ROOT/bin/$PREFIX-$TOOL "$@"
fi
